#!/bin/bash
set -euo pipefail

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR="$( cd "$DIR"/../.. && pwd )"
BUILD_DIR="$( cd "$ROOT_DIR"/build && pwd )"

if [ "$( ls "$BUILD_DIR"/*.xpi | wc -l )" -gt 1 ]; then
	echo "More than one XPI found"
	exit 1
fi

ls "$BUILD_DIR"/*.xpi
